import mujoco

import numpy as np
import mujoco.viewer as viewer
from os.path import dirname, join

# 加载模型
model = mujoco.MjModel.from_xml_path(join(dirname(__file__),'cartpole.xml')) 
data = mujoco.MjData(model)

viewer.launch(model,data)